package designparttendemo.factoryMethod;

import org.springframework.beans.factory.config.AbstractFactoryBean;
import org.springframework.stereotype.Component;

@Component
public class BikeFactoryBean extends AbstractFactoryBean<IBike> {
    @Override
    public Class<?> getObjectType() {
        return MyBike.class;
    }

    @Override
    protected IBike createInstance() throws Exception {
        return new MyBike();
    }
}
